﻿@using SCMS.Resources
@model SCMS.UI.Models.UDesignation
@{AjaxOptions ajaxOpts = new AjaxOptions
  {
      UpdateTargetId = "ContentDiv",
      LoadingElementId = "loading",
      HttpMethod = "Post",
      Url = Url.Action("CreateEdit"),
      OnSuccess = "CloseDialog();if (document.getElementById('table') != null) {initSorter();sorter.size(20);}"
  };
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Ajax.BeginForm(null, null, ajaxOpts, new { @class = "form" }))
{
    @Html.ValidationSummary(true)
    <table>
        <tbody>            
            <tr>
                <td align="right">@Resources_frank.Global_String_Name<font color="red">*</font>:</td>
                <td>
                    @Html.TextBoxFor(m => m.Name)<br />
                    @Html.ValidationMessageFor(model => model.Name)
                    @Html.HiddenFor(m => m.Id)
                </td>
            </tr>
            <tr>
                <td align="right">@Resources_frank.Global_String_ShortName<font color="red">*</font>:</td>
                <td>
                    @Html.TextBoxFor(model => model.ShortName)<br />
                    @Html.ValidationMessageFor(model => model.ShortName)
                </td>
            </tr>            
            <tr>
                <td align="right">@Resources_frank.Global_String_Description:</td>
                <td>
                    @Html.TextAreaFor(model => model.Description) 
                </td>
            </tr>
            <tr>
                <td align="right"></td>
                <td>
                    <input type="submit" class="btn green" value="@(ViewBag.Action != null ? ViewBag.Action : Resources_frank.Global_String_Save)" />
                </td>
            </tr>
        </tbody>
    </table>
}

